-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Introduce Basic NanoDLP Support #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…tcher for Backend Error Handling
…thods with error handling
…widget build to avoid setState issues
…hods to OdysseyHttpClient
…ration and adjust UI accordingly - no need to show a USB/Internal Switcher, NanoDLP combines the list.
…me and handle errors gracefully
… and update button actions
… fallback to display status
- Added NanoStatus model to represent the status of the NanoDLP device. - Created NanoDlpHttpClient to handle communication with the NanoDLP API, including status retrieval and file management. - Implemented mapping functions to convert NanoDLP data structures to Odyssey-compatible formats. - Introduced thumbnail generation functionality for visual representation of files.
…ate thumbnail generation logic
…s, and thumbnail generator
…seyClient and FakeOdysseyClientForThumbnailTest
…nt and prefetching
… bytes and improve snapshot handling
…ogic for improved accuracy in z position calculation
…timeout handling and improved client creation
…ort parsing from human-readable date strings
…rove thumbnail utility tests
…ionality in GeneralCfgScreen
…abled before disabling Orion service - use correct update branch
…or fetching fresh thumbnails
…achine state values
…state handling and cancel latching
…enhance canceling logic with model-level hints
…onical 'finished' state for improved status handling
…nced state tracking
…spinner logic for improved UI responsiveness
… dismissing spinner
…ion to 'Use Custom Backend URL' - we can use alternative backends now
…ergency stop functionality
…vement, and critical errors
…anodlp_basic_support
…ents with Phosphor icons
…encyStop, and getBackendVersion
…eature flag accessors - preparing for Athena-specific features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it mostly looks good? A few concerns/comments tho.
| this.cancelLatched, | ||
| this.pauseLatched, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what these are for?
| Future<bool> canMoveToTop(); | ||
| Future<bool> canMoveToFloor(); | ||
|
|
||
| /// Move the Z axis directly to the device's top limit if supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do full method docs for each of these for consistency?
| Future<bool> canMoveToTop(); | ||
| Future<bool> canMoveToFloor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These feel unnecessary? We should either just be able to catch the unimplemented exception and surface it sensibly to the UI, or, better yet, just use the manual move endpoint to achieve the same functionality :P
| @override | ||
| Future<bool> canMoveToTop() async => true; | ||
|
|
||
| @override | ||
| Future<bool> canMoveToFloor() async => true; | ||
|
|
||
| @override | ||
| Future<Map<String, dynamic>> moveToTop() async => | ||
| throw UnimplementedError('moveToTop not supported by Odyssey backend'); | ||
|
|
||
| @override | ||
| Future<Map<String, dynamic>> moveToFloor() async => | ||
| throw UnimplementedError('moveToFloor not supported by Odyssey backend'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment about making this functionality work with Odyssey.
Also, are the canMoveTo_ methods supposed to be returning true?? 💀
|
|
||
| @override | ||
| Future<Map<String, dynamic>> emergencyStop() async { | ||
| return await manualCommand('M112'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want a dedicated emergencyStop endpoint on Odyssey?
| _deviceStatusMessage = | ||
| (raw['device_status_message'] ?? raw['Status'] ?? raw['status']) | ||
| ?.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we want to add to Odyssey?
| child: Scaffold( | ||
| appBar: AppBar( | ||
| title: Text(_meta?.fileData.name ?? widget.fileName), | ||
| title: Text('Print Details'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall, what was the reason for this change?
| if (_isNanoDlp) return 'Print Files'; | ||
| return _isUSB == false ? 'Print Files (Internal)' : 'Print Files (USB)'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should do some significant refactoring of how this works on Odyssey, and just have a notion of multiple file locations with config-assigned titles?
That could make this easier/more-agnostic too, because you could just use "Print Files${dirTitle!=null ? ' ($dirTitle)' : ''} or something
which would just give you Print Files for nano, or things like Print Files (Internal), Print Files (USB 1), etc., for Odyssey
|
|
||
| // If it's a subdirectory of the default directory, only show the directory name | ||
| if (_apiErrorState) return 'Odyssey API Error'; | ||
| return "$directory ${_isUSB ? '(USB)' : '(Internal)'}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line above this, the Odyssey API Error, should probably change to Backend Error or smth
| */ | ||
|
|
||
| import 'dart:io'; | ||
| // dart:io not needed once thumbnails are rendered from memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove dead code?
This pull requests initial NanoDLP support, implementing and activating NanoDLP HTTP Clients and Models.
The branch does not add additional features, it only allows rewiring Orion to accept the NanoDLP backend to perform already implemented tasks such as:
Additionally, some refactors have been made to
DetailsScreenandStatusScreento optimize information density.